import http from '@/utils/http'

import {
	adviceResponse
} from './app.js';


export function updateUserInfo(userInfo) {
	let acToken = uni.getStorageSync('userToken');
	http.config.header.Authorization = acToken;

	var config = http.post('/wx/user/updateUser', userInfo, {
		loadingText: false
	});

	return adviceResponse(config);
}

export function getWxUserInfo(userInfo) {
	let acToken = uni.getStorageSync('userToken');
	http.config.header.Authorization = acToken;

	var config = http.post('/wx/user/getWxUserInfo', null, {
		loadingText: false
	});

	return adviceResponse(config);
}